<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('用户信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>用户ID：</label>
                                <input type="text" name="userId"/>
                            </li>
                            <li>
                                <label>用户类型：</label>
                                <select name="userType">
                                    <option value="">所有</option>

                                </select>
                            </li>
                            <li>
                                <label>办卡人：</label>
                                <input type="text" name="userName"/>
                            </li>
                            <li>
                                <label>证件类型：</label>
                                <select name="certType">
                                    <option value="">所有</option>
                                    <option value="1">身份证</option>

                                </select>
                            </li>
                            <li>
                                <label>证件号码：</label>
                                <input type="text" name="certNo"/>
                            </li>
                            <li>
                                <label>联系电话：</label>
                                <input type="text" name="linkPhone"/>
                            </li>
                            <li>
                                <label>联系地址：</label>
                                <input type="text" name="linkAddress"/>
                            </li>
                            <li>
                                <label>指定联系人：</label>
                                <input type="text" name="contact"/>
                            </li>
                            <li>
                                <label>部门名称：</label>
                                <input type="text" name="department"/>
                            </li>
                            <li>
                                <label>指定经办人：</label>
                                <input type="text" name="agentName"/>
                            </li>
                            <li>
                                <label>指定经办人证件类型：</label>
                                <select name="agentCertType">
                                    <option value="">所有</option>
                                    <option value="1">身份证</option>

                                </select>
                            </li>
                            <li>
                                <label>指定经办人证件号：</label>
                                <input type="text" name="agentCertNo"/>
                            </li>
                            <li>
                                <label>单位开户行：</label>
                                <input type="text" name="bank"/>
                            </li>
                            <li>
                                <label>单位开户行地址：</label>
                                <input type="text" name="bankAddr"/>
                            </li>
                            <li>
                                <label>单位开户行账号：</label>
                                <input type="text" name="bankAccount"/>
                            </li>
                            <li>
                                <label>单位纳税人识别号：</label>
                                <input type="text" name="taxpayerCode"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="userinfo:userinfo:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="userinfo:userinfo:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="userinfo:userinfo:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="userinfo:userinfo:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('userinfo:userinfo:edit')}]];
        var removeFlag = [[${@permission.hasPermi('userinfo:userinfo:remove')}]];
        var prefix = ctx + "userinfo/userinfo";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "用户信息",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '主键id',
                    visible: false
                },
                {
                    field: 'userId',
                    title: '用户ID'
                },
                {
                    field: 'userType',
                    title: '用户类型'
                },
                {
                    field: 'userName',
                    title: '办卡人'
                },
                {
                    field: 'certType',
                    title: '证件类型'
                },
                {
                    field: 'certNo',
                    title: '证件号码'
                },
                {
                    field: 'linkPhone',
                    title: '联系电话'
                },
                {
                    field: 'linkAddress',
                    title: '联系地址'
                },
                {
                    field: 'contact',
                    title: '指定联系人'
                },
                {
                    field: 'department',
                    title: '部门名称'
                },
                {
                    field: 'agentName',
                    title: '指定经办人'
                },
                {
                    field: 'agentCertType',
                    title: '指定经办人证件类型'
                },
                {
                    field: 'agentCertNo',
                    title: '指定经办人证件号'
                },
                {
                    field: 'bank',
                    title: '单位开户行'
                },
                {
                    field: 'bankAddr',
                    title: '单位开户行地址'
                },
                {
                    field: 'bankAccount',
                    title: '单位开户行账号'
                },
                {
                    field: 'taxpayerCode',
                    title: '单位纳税人识别号'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>